package com.myproject.musicrecommendationsystem.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 评论实体类
 */
@Data
@TableName("review")
public class Review {
    @TableId(type = IdType.AUTO)
    private Integer id; // 评论ID
    private int songId; // 歌曲ID
    private int userId; // 用户ID
    private String content; // 评论内容
    private Integer rating; // 评分（1-5）
    private Date createTime; // 创建时间
    private Date updateTime; // 更新时间

    public Review() {}

    public Review(int id, int songId, int userId, String content, Integer rating, Date createTime, Date updateTime) {
        this.id = id;
        this.songId = songId;
        this.userId = userId;
        this.content = content;
        this.rating = rating;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Review{" +
                "评论id=" + id +
                ",歌曲id=" + songId +
                ", 用户id=" + userId +
                ", 评论内容='" + content + '\'' +
                ", 评分=" + rating +
                ", 创建时间=" + createTime +
                ", 修改时间=" + updateTime +
                '}';
    }
}
